{% extends 'resume_manage/base_information.html' %}

{% load static %}

{% block content %}
    <div class="container">
        <h2>获奖情况</h2>
        <form id="awards-form" method="post">
            {% csrf_token %}
            <div class="experience-item">
                <div class="form-group">
                    <label for="award_name">奖项名称</label>
                    <input type="text" class="form-control" id="award_name" name="award_name" required
                           value="{{ form.award_name }}">
                </div>

                <div class="form-group">
                    <label for="award_level">获奖级别</label>
                    <select class="form-control" id="award_level" name="award_level" required>
                        <option value="">请选择</option>
                        <option value="校级" {% if form.award_level == '校级' %}selected{% endif %}>校级</option>
                        <option value="市级" {% if form.award_level == '市级' %}selected{% endif %}>市级</option>
                        <option value="省级" {% if form.award_level == '省级' %}selected{% endif %}>省级</option>
                        <option value="国家级" {% if form.award_level == '国家级' %}selected{% endif %}>国家级</option>
                        <option value="国际级" {% if form.award_level == '国际级' %}selected{% endif %}>国际级</option>
                    </select>
                </div>

                <div class="form-group">
                    <label for="award_date">获奖时间</label>
                    <input type="date" class="form-control" id="award_date" name="award_date" required
                           value="{{ form.award_date }}">
                </div>

                <div class="form-group">
                    <label for="award_organization">颁发机构</label>
                    <input type="text" class="form-control" id="award_organization" name="award_organization" required
                           value="{{ form.award_organization }}">
                </div>

                <div class="form-group">
                    <label for="award_description">奖项描述</label>
                    <textarea class="form-control" id="award_description" name="award_description"
                              rows="3">{{ form.description }}</textarea>
                </div>
            </div>
            <a href="#" class="add-section" id="add-award"><i class="fas fa-plus-circle"></i> 添加获奖情况</a>


            <div class="action-buttons">
                <button type="submit" class="btn btn-primary" id="save-awards">保存</button>
            </div>
        </form>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
    <script src="{% static 'js/awards.js' %}"></script>
{% endblock %}